using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.IO;

namespace FiltronASP.Helpers.Instructions
{
    public class FilterInstructions
    {
        private static List<string> filterInstructions = new List<string>();

        public static string getFilterInstruction(string filtronFilterNumber, string wixFilterNumber) {
            if ((String.IsNullOrEmpty(filtronFilterNumber)) && (String.IsNullOrEmpty(wixFilterNumber)))
            {
                return String.Empty;
            }   //if
            if (!String.IsNullOrEmpty(filtronFilterNumber))
            {
                if (File.Exists(HttpContext.Current.Server.MapPath(String.Format("~/Content/pdf/{0}.pdf", filtronFilterNumber))))
                {
                    return VirtualPathUtility.ToAbsolute(String.Format("~/Content/pdf/{0}.pdf", filtronFilterNumber));
                }
            }   //if
            if (!String.IsNullOrEmpty(wixFilterNumber))
            {
                if (File.Exists(HttpContext.Current.Server.MapPath(String.Format("~/Content/pdf/{0}.pdf", wixFilterNumber))))
                {
                    return VirtualPathUtility.ToAbsolute(String.Format("~/Content/pdf/{0}.pdf", wixFilterNumber));
                }
            }   //if
            return String.Empty;
        }

        private static void makeList() {
            Helpers.Instructions.FilterInstructions.filterInstructions.Add("K1296A");
            Helpers.Instructions.FilterInstructions.filterInstructions.Add("K1288A");
            Helpers.Instructions.FilterInstructions.filterInstructions.Add("K1278A");
            Helpers.Instructions.FilterInstructions.filterInstructions.Add("K1270A-2x");
            Helpers.Instructions.FilterInstructions.filterInstructions.Add("K1267A");
            Helpers.Instructions.FilterInstructions.filterInstructions.Add("K1265A");
            Helpers.Instructions.FilterInstructions.filterInstructions.Add("K1239A");
            Helpers.Instructions.FilterInstructions.filterInstructions.Add("K1238A");
            Helpers.Instructions.FilterInstructions.filterInstructions.Add("K1237A");
            Helpers.Instructions.FilterInstructions.filterInstructions.Add("K1227A-2x");
            Helpers.Instructions.FilterInstructions.filterInstructions.Add("K1223A");
            Helpers.Instructions.FilterInstructions.filterInstructions.Add("K1162A-2x");
            Helpers.Instructions.FilterInstructions.filterInstructions.Add("K1126A");
            Helpers.Instructions.FilterInstructions.filterInstructions.Add("K1106A");
            Helpers.Instructions.FilterInstructions.filterInstructions.Add("K9144");
            Helpers.Instructions.FilterInstructions.filterInstructions.Add("K1296");
            Helpers.Instructions.FilterInstructions.filterInstructions.Add("K1293");
            Helpers.Instructions.FilterInstructions.filterInstructions.Add("K1290");
            Helpers.Instructions.FilterInstructions.filterInstructions.Add("K1289-2x");
            Helpers.Instructions.FilterInstructions.filterInstructions.Add("K1288");
            Helpers.Instructions.FilterInstructions.filterInstructions.Add("K1287");
            Helpers.Instructions.FilterInstructions.filterInstructions.Add("K1279-2x");
            Helpers.Instructions.FilterInstructions.filterInstructions.Add("K1278");
            Helpers.Instructions.FilterInstructions.filterInstructions.Add("K1277");
            Helpers.Instructions.FilterInstructions.filterInstructions.Add("K1276A");
            Helpers.Instructions.FilterInstructions.filterInstructions.Add("K1273");
            Helpers.Instructions.FilterInstructions.filterInstructions.Add("K1272-2x");
            Helpers.Instructions.FilterInstructions.filterInstructions.Add("K1271");
            Helpers.Instructions.FilterInstructions.filterInstructions.Add("K1270-2x");
            Helpers.Instructions.FilterInstructions.filterInstructions.Add("K1268");
            Helpers.Instructions.FilterInstructions.filterInstructions.Add("K1267");
            Helpers.Instructions.FilterInstructions.filterInstructions.Add("K1265");
            Helpers.Instructions.FilterInstructions.filterInstructions.Add("K1264");
            Helpers.Instructions.FilterInstructions.filterInstructions.Add("K1263");
            Helpers.Instructions.FilterInstructions.filterInstructions.Add("K1262-2x");
            Helpers.Instructions.FilterInstructions.filterInstructions.Add("K1162-2x");
            Helpers.Instructions.FilterInstructions.filterInstructions.Add("K1261");
            Helpers.Instructions.FilterInstructions.filterInstructions.Add("K1259A");
            Helpers.Instructions.FilterInstructions.filterInstructions.Add("K1258");
            Helpers.Instructions.FilterInstructions.filterInstructions.Add("K1257-2x");
            Helpers.Instructions.FilterInstructions.filterInstructions.Add("K1256");
            Helpers.Instructions.FilterInstructions.filterInstructions.Add("K1255");
            Helpers.Instructions.FilterInstructions.filterInstructions.Add("K1254-2x");
            Helpers.Instructions.FilterInstructions.filterInstructions.Add("K1252");
            Helpers.Instructions.FilterInstructions.filterInstructions.Add("K1251");
            Helpers.Instructions.FilterInstructions.filterInstructions.Add("K1248-2x");
            Helpers.Instructions.FilterInstructions.filterInstructions.Add("K1247A");
            Helpers.Instructions.FilterInstructions.filterInstructions.Add("K1246A");
            Helpers.Instructions.FilterInstructions.filterInstructions.Add("K1245");
            Helpers.Instructions.FilterInstructions.filterInstructions.Add("K1242-2x");
            Helpers.Instructions.FilterInstructions.filterInstructions.Add("K1240A");
            Helpers.Instructions.FilterInstructions.filterInstructions.Add("K1239");
            Helpers.Instructions.FilterInstructions.filterInstructions.Add("K1238");
            Helpers.Instructions.FilterInstructions.filterInstructions.Add("K1237");
            Helpers.Instructions.FilterInstructions.filterInstructions.Add("K1236");
            Helpers.Instructions.FilterInstructions.filterInstructions.Add("K1235A-2x");
            Helpers.Instructions.FilterInstructions.filterInstructions.Add("K1232");
            Helpers.Instructions.FilterInstructions.filterInstructions.Add("K1231");
            Helpers.Instructions.FilterInstructions.filterInstructions.Add("K1228");
            Helpers.Instructions.FilterInstructions.filterInstructions.Add("K1227-2x");
            Helpers.Instructions.FilterInstructions.filterInstructions.Add("K1223");
            Helpers.Instructions.FilterInstructions.filterInstructions.Add("K1219");
            Helpers.Instructions.FilterInstructions.filterInstructions.Add("K1218");
            Helpers.Instructions.FilterInstructions.filterInstructions.Add("K1217");
            Helpers.Instructions.FilterInstructions.filterInstructions.Add("K1216");
            Helpers.Instructions.FilterInstructions.filterInstructions.Add("K1212-2x");
            Helpers.Instructions.FilterInstructions.filterInstructions.Add("K1210");
            Helpers.Instructions.FilterInstructions.filterInstructions.Add("K1183");
            Helpers.Instructions.FilterInstructions.filterInstructions.Add("K1169");
            Helpers.Instructions.FilterInstructions.filterInstructions.Add("K1163");
            Helpers.Instructions.FilterInstructions.filterInstructions.Add("K1161A");
            Helpers.Instructions.FilterInstructions.filterInstructions.Add("K1156");
            Helpers.Instructions.FilterInstructions.filterInstructions.Add("K1141");
            Helpers.Instructions.FilterInstructions.filterInstructions.Add("K1137A");
            Helpers.Instructions.FilterInstructions.filterInstructions.Add("K1130");
            Helpers.Instructions.FilterInstructions.filterInstructions.Add("K1128");
            Helpers.Instructions.FilterInstructions.filterInstructions.Add("K1126");
            Helpers.Instructions.FilterInstructions.filterInstructions.Add("K1123");
            Helpers.Instructions.FilterInstructions.filterInstructions.Add("K1117");
            Helpers.Instructions.FilterInstructions.filterInstructions.Add("K1106");
            Helpers.Instructions.FilterInstructions.filterInstructions.Add("K1102");
            Helpers.Instructions.FilterInstructions.filterInstructions.Add("K1088");
            Helpers.Instructions.FilterInstructions.filterInstructions.Add("K1083");
            Helpers.Instructions.FilterInstructions.filterInstructions.Add("K1070");
            Helpers.Instructions.FilterInstructions.filterInstructions.Add("K1066");
            Helpers.Instructions.FilterInstructions.filterInstructions.Add("K1031");
            Helpers.Instructions.FilterInstructions.filterInstructions.Add("K980-7");
            Helpers.Instructions.FilterInstructions.filterInstructions.Add("K980-2");
            Helpers.Instructions.FilterInstructions.filterInstructions.Add("K976-2");
            Helpers.Instructions.FilterInstructions.filterInstructions.Add("K974");
            Helpers.Instructions.FilterInstructions.filterInstructions.Add("K974-1");
            Helpers.Instructions.FilterInstructions.filterInstructions.Add("K850");
            Helpers.Instructions.FilterInstructions.filterInstructions.Add("K1014");
            Helpers.Instructions.FilterInstructions.filterInstructions.Add("K841-6");
            Helpers.Instructions.FilterInstructions.filterInstructions.Add("K841-1");
            Helpers.Instructions.FilterInstructions.filterInstructions.Add("K839-4");
            Helpers.Instructions.FilterInstructions.filterInstructions.Add("K839-1");
            Helpers.Instructions.FilterInstructions.filterInstructions.Add("K838-4");

        }
    }
}
